<div class="pl-3 pr-3 bg-white">
    <h4>仓库库区详情 </h4>
</div>
<div class="p-2">
    <div class="card">
        <div class="card-body">
            <div>
                <div class="border-bottom">
                    <div class="card-body">
                        <!-- <pre>{{warehous|json}}</pre> -->
                        <div class="container m-0">
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label label-required text-right">所属仓库</label>
                                <div class="col-sm-10">
                                    <select [(ngModel)]="warehous.warehouseId" class="custom-select" placeholder="请选择发票类型">
                                        <option *ngFor="let type of warehouse" [ngValue]="type.id">{{type.warehouseName}}</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label label-required text-right">库区名称</label>
                                <div class="col-sm-10">
                                    <div class="row">
                                        <div class="col">
                                            <input [(ngModel)]="warehous.warehouseRegionName" type="text" class="form-control" placeholder="请输入库区名称">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label label-required text-right">库区编号</label>
                                <div class="col-sm-10">
                                    <div class="row">
                                        <div class="col">
                                            <input [(ngModel)]="warehous.warehouseRegionNumber" type="text" class="form-control" placeholder="请输入库区编号">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label label-required text-right">库区面积</label>
                                <div class="col-sm-10">
                                    <div class="row">
                                        <div class="col">
                                            <input [(ngModel)]="warehous.warehouseRegionArea" type="text" class="form-control" placeholder="请输入库区面积">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mt-2 m-btn">
                    <button routerLink="/warehous/warehous" tsBtn color="white">返回列表</button>
                    <button *ngIf="warehous.id===0" tsBtn loading color="success" (submit)="confirmInsert($event)">确认添加</button>
                    <button tsBtn color="warning">添加新客户</button>
                    <!-- (click)="resetForm()" -->
                    <button *ngIf="warehous.id>0" tsBtn loading color="primary" (submit)="confirmUpdate($event)">确认修改</button>
                </div>
            </div>

        </div>
    </div>
</div>
<div class="p-2">
    <div class="card rounded-0">
        <div class="card-body">
            <ts-table-load [display]="loading"></ts-table-load>
            <div class="table-responsive">
                <table class="table table-striped">
                    <tbody>
                        <tr class="font-weight-bold bg-light">
                            <td *ngFor="let th of theads">{{th}}</td>
                        </tr>
                        <tr *ngFor="let td of list">
                            <td>{{td.id}}</td>
                            <td>{{td.warehouseNumber}}</td>
                            <td>{{td.warehouseName}}</td>
                            <td>{{td.warehouseAddress}}</td>
                            <td>{{td.warehousePhone}}</td>
                            <td>{{td.warehouseArea}}</td>
                            <td>{{td.departmentName}}</td>
                            <td>
                                <ts-switch name="status" [color]="global.getValue('color')" [values]="{open:1,close:0}" [(ngModel)]="td.status" (ngModelChange)="change(th)">
                                </ts-switch>
                            </td>
<!-- 
                            <td>
                                <span (click)="confirmDelete(td.id)" tsTip="删除" class="btn-icon btn-icon-danger">
                                    <i tsIcon="delete"></i>
                                </span>
                                <span tsTip="详情/编辑" class="btn-icon btn-icon-info" routerLink="detail/{{td.id}}">
                                    <i tsIcon="edit"></i>
                                </span>
                            </td> -->
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="text-right">
                <ts-pagination (pageChange)="loadDatas()" [pagination]="pagination" [items]="[{text:'显示 5 条',value:5},{text:'显示 10 条',value:10},{text:'显示 20 条',value:20}]"
                    [color]="global.params.color" goTitle="跳转" prevTitle="上一页" nextTitle="下一页" startTitle="首页" endTitle="末尾"
                    outline></ts-pagination>
            </div>
        </div>
    </div>
</div>